#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)

#include<stdio.h>
#include<stdlib.h>
//qsort(void* array,size_t num,size_t size,int(*compar)(const void*,const void*));

int compar(const void* p1,const void* p2)
{
	return (*(int*)p2 - *(int*)p1);
}

void print(int arr[], int num)
{
	for (int i = 0; i < num; i++)
	{
		printf("%d ", arr[i]);
	}
}
test1()
{
	int arr[10] = { 9,8,7,6,5,4,3,2,1,0 };
	int num = sizeof(arr) / sizeof(arr[0]);
	qsort(arr, num, sizeof(arr[0]), compar);
	print(arr, num);

}

int main()
{
	test1();
	return 0;
}